home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.tip.net!usenet
- From: mikael.berglund@amiga.pp.se (Mikael Berglund)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: MsgPorts and lists
- Date: 23 Feb 1996 20:01:16 GMT
- Organization: Uniplus Internet Access
- Message-ID: <1677.6627T1226T921@amiga.pp.se>
- References: <1527.6618T48T2102@amiga.pp.se> <4gd8uo$btm@sundog.tiac.net>
- NNTP-Posting-Host: a711011.dial.tip.net
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
-
-
- In a message 20-Feb-96 20:55:04 Darius Taghavy <dart@ycrdi.com> wrote:
-
- DT> Why?
-
- Huh? :D Because the message does not belong to the window the handler
- currently popping messages is responsible for. It has to be returned to the
- message dispatcher so it can determine to which handler this message belongs.
-
- DT> Better solution: Walk the list in the main handler.
-
- There's really no need for it since the windows are not parallell in
- execution. Remember that it is windows we are discussing and letting the
- handler arbitrarily pluck the messages of the list could screw up the order
- in which these events are meant to be.
-
- As i described earlier, popping a message from the list, determine
- addressee, let the addressee take over until it finds a message not
- addressed to itself, returns control to the main dispatcher which decides
- the addressee for the returned message should be relatively effective with
- windows as one can assume that for the most part a stream of messages will
- be addressed to one special window before a new stream of messages to
- another window occurs.
-
- What i really was wondering was: Would it be more effective to Disable(),
- examine addressee, Enable(), offer control to the addressee, who GetMsg()
- until a message is not addressed to itself, Disable(), put message back in
- list, Enable(), return control to the main dispatcher? And is it legal to
- mess around with the message lists? The last question i have got an answer
- and that is yes. The other remains.
-
- As i see it it would avoid argumentpassing between libraries, cleaner code
- with less 'if's making the code possibly smaller and more effective.
-
- --
- Regards TMB PGP public key available
-
-